package com.hwadee.teachingprocessmanagementsystem.dto.teacher;

import com.hwadee.teachingprocessmanagementsystem.dto.DepartmentDto;
import com.hwadee.teachingprocessmanagementsystem.dto.MajorDto;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author LINKE
 * @ProjectName:teaching-process-management-system-back
 * @Title: TeacherTalentPlanDto
 * @Package com.hwadee.teachingprocessmanagementsystem.dto.teacher
 * @Description: 教师人才培养方案数据传输对象
 * @date 2024/7/15 9:14
 */

@Data
public class TeacherTalentPlanDto implements Serializable{
    // 系部dto，存储所有系部名称列表
    private DepartmentDto departmentDto;

    //专业dto，存储所有专业名称列表
    private MajorDto majorDto;

    // 展示列表
    private List<TeacherTalentPlan> teacherTalentPlanList;

    public void addTeacherTalentPlan(TeacherTalentPlan teacherTalentPlan) {
        if (this.teacherTalentPlanList == null) {
            this.teacherTalentPlanList = new ArrayList<>();
        }
        this.teacherTalentPlanList.add(teacherTalentPlan);
    }

    //向列表添加培养方案
    public void addTeacherTalentPlan(String majorCode, String majorName, String teachingPlan, String departmentName) {
        TeacherTalentPlan teacherTalentPlan = new TeacherTalentPlan();
        teacherTalentPlan.setMajorCode(majorCode);
        teacherTalentPlan.setMajorName(majorName);
        teacherTalentPlan.setTeachingPlan(teachingPlan);
        teacherTalentPlan.setDepartmentName(departmentName);
        this.addTeacherTalentPlan(teacherTalentPlan);
    }

    /**
     * 获取培养方案的一条记录
     * @return TeacherTalentPlan
     */
    public TeacherTalentPlan getTeacherTalentPlan() {
        return new TeacherTalentPlan();
    }
}



@Data
class TeacherTalentPlan implements Serializable {

    //专业代码
    private String majorCode;
    //专业名称
    private String majorName;
   //培养方案
    private String teachingPlan;
    //所属院系
    private String departmentName;

}